Use Google Analytics legally
For a long time, Google Analytics was a red rag for German privacy advocates. Then, surprisingly, the search engine group came to an agreement with data protection officials on the legally compliant use of Google Analytics. Nevertheless, site operators still have a lot to do in order to be able to use Google Analytics legally and without fear of warnings. We'll show you step by step how to do it.
The signed agreement in duplicate and a self-addressed return envelope must be mailed to Google in Ireland:
Contract Administration Department
Google Ireland Ltd
Gordon House Barrow St Dublin 4
Ireland
IMPORTANT: Each webmaster must independently anchor the code for the anonymizeIP() function in his Google Analytics code.
The standard Google Analytics code looks like this:
![](https://media.sim-design.de/978753-237/alben/1/36032.png)
With the anonymizeIP() function it then looks like this:
![](https://media.sim-design.de/978753-237/alben/1/36033.png)
So you have to gtag('config', 'UA-XXX-X'); With gtag('config', 'UA-XXX-X', { 'anonymize_ip': true }); substitute. For UA-XXX-X, enter your identifier.
The link to the browser plugin is https://tools.google.com/dlpage/gaoptout?hl=de
You set the opt-out cookie as follows:
![](https://media.sim-design.de/978753-237/alben/1/36036.png)
You can download the code here
1. Order data processing
Enter into an order data agreement with Google. Here you can view and use the model contract created by Google and data protection officers: https://static.googleusercontent.com/media/www.google.com/de//analytics/terms/de.pdfThe signed agreement in duplicate and a self-addressed return envelope must be mailed to Google in Ireland:
Contract Administration Department
Google Ireland Ltd
Gordon House Barrow St Dublin 4
Ireland
2. IP anonymization
Google Analytics may only be used if the user's IP address is shortened before it is transmitted to Google. For this purpose, Google has introduced the code "anonymizeIP". You have to include this code in your Google Analytics code.IMPORTANT: Each webmaster must independently anchor the code for the anonymizeIP() function in his Google Analytics code.
Do you already have a website with us? Then our system will do the implementation automatically and you can skip this section.Since the implementation of the code is described in a very vague manner in Google's instructions, we have written our own short instructions:
The standard Google Analytics code looks like this:
![](https://media.sim-design.de/978753-237/alben/1/36032.png)
With the anonymizeIP() function it then looks like this:
![](https://media.sim-design.de/978753-237/alben/1/36033.png)
So you have to gtag('config', 'UA-XXX-X'); With gtag('config', 'UA-XXX-X', { 'anonymize_ip': true }); substitute. For UA-XXX-X, enter your identifier.
3. Set browser plug-in and opt-out cookie
The instruction about Google Analytics must also point out to the user that he can object to the tracking. The possibility of objection must also be technically correctly implemented on your site.- Browser plugin for desktop
- Opt out cookie for mobile
The link to the browser plugin is https://tools.google.com/dlpage/gaoptout?hl=de
You set the opt-out cookie as follows:
![](https://media.sim-design.de/978753-237/alben/1/36036.png)
You can download the code here